package com.huishu.order.controller;


import com.huishu.commons.pojo.Result;
import com.huishu.order.pojo.model.ActivityDescriptionDO;
import com.huishu.order.service.ActivityDescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* @author generator@ljj
* @since 2023-04-27
*/
@RestController
@RequestMapping("/activity-description")
public class ActivityDescriptionController {

    @Autowired
    private ActivityDescriptionService activityDescriptionService;

    @GetMapping("/find-activity")
    public Result findActivity(){
        return Result.success(activityDescriptionService.getOne(null));
    }

    @PostMapping("/update")
    public Result update(@RequestBody ActivityDescriptionDO activityDescriptionDO){
        activityDescriptionService.updateById(activityDescriptionDO);
        return Result.success();
    }
}
